package com.hundun.lickdog.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hundun.domain.Result;
import com.hundun.lickdog.entity.LickDog;
import com.hundun.lickdog.service.LickDogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 谢
 * @since 2020-05-08
 */
@RestController
@RequestMapping("/lickdog/lick-dog")
@Api(tags ="舔狗日记")
public class LickDogController {

    @Autowired
    LickDogService lickDogService;

    @ApiOperation("获取舔狗/渣男/渣女/暖男语句")
    @GetMapping("list/{type}")
    public Result<LickDog> list(@PathVariable String type){
         List<LickDog>  list=lickDogService.list(new QueryWrapper<LickDog>().eq("type",type));
         return Result.success(list);
    }





}

